home *** CD-ROM | disk | FTP | other *** search
- diff +context=3 +entire-new-file ogcc-1.39/cccp.c gcc-1.39/cccp.c
- *** ogcc-1.39/cccp.c Sun Mar 24 14:56:36 1991
- --- gcc-1.39/cccp.c Sun Mar 24 15:10:00 1991
- ***************
- *** 847,852 ****
- --- 847,880 ----
- if (ignore_srcdir && first_bracket_include == 0)
- first_bracket_include
- = (cplusplus ? cplusplus_include_defaults : include_defaults);
- +
- + #ifdef GNUDOS
- + { /* GNUDOS: use GCCINC environment variable to find #includes */
- + char *env_inc = getenv("GCCINC");
- + if (env_inc)
- + {
- + char *ep;
- + for (ep=env_inc; *ep; ep++)
- + if (*ep == '\\') *ep = '/';
- + if (ep[-1] == '/') ep[-1] = 0;
- + if (cplusplus)
- + {
- + cplusplus_include_defaults[0].fname = env_inc;
- + cplusplus_include_defaults[1].fname = env_inc;
- + cplusplus_include_defaults[2].fname = env_inc;
- + }
- + else
- + {
- + include_defaults[0].fname = env_inc;
- + include_defaults[1].fname = env_inc;
- + include_defaults[2].fname = env_inc;
- + }
- + if (strlen(env_inc) > max_include_len)
- + max_include_len = strlen(env_inc);
- + }
- + }
- + #endif
- +
- }
-
- /* Initialize output buffer */
- Common subdirectories: ogcc-1.39/config and gcc-1.39/config
- diff +context=3 +entire-new-file ogcc-1.39/config-d.bat gcc-1.39/config-d.bat
- *** ogcc-1.39/config-d.bat
- --- gcc-1.39/config-d.bat Thu Mar 7 00:12:02 1991
- ***************
- *** 0 ****
- --- 1,12 ----
- + copy config\xm-i386.h config.h
- + copy config\tm-i386gas.h tm.h
- + copy config\i386.md md
- + copy config\out-i386.c aux-output.c
- + echo #define BSD>> config.h
- + echo #undef ASM_OUTPUT_ALIGN_CODE>>tm.h
- + echo #define ASM_OUTPUT_ALIGN_CODE(FILE)\>>tm.h
- + echo fprintf((FILE), "\t.align 2,144\n"); /* NOPs */>>tm.h
- + echo #undef ASM_OUTPUT_ALIGN>>tm.h
- + echo #define ASM_OUTPUT_ALIGN(FILE,LOG)\>>tm.h
- + echo if (LOG) fprintf((FILE), "\t.align %%d,144\n", (LOG)); /* NOPs */>>tm.h
- + echo Configured for MS-DOS 386 using GAS > config.status
- diff +context=3 +entire-new-file ogcc-1.39/gcc.c gcc-1.39/gcc.c
- *** ogcc-1.39/gcc.c Sun Mar 24 14:56:50 1991
- --- gcc-1.39/gcc.c Sun Mar 24 15:10:38 1991
- ***************
- *** 124,134 ****
- --- 124,150 ----
- #include <stdio.h>
- #include <sys/types.h>
- #include <signal.h>
- + #ifndef __TURBOC__
- #include <sys/file.h>
- + #else
- + #define SIGPIPE 1234
- + #include <process.h>
- + #include <errno.h>
- + #define R_OK 4
- + #define W_OK 2
- + #define X_OK 1
- + #define bcopy(a,b,c) memcpy (b,a,c)
- + #define bzero(a,b) memset (a,0,b)
- + #define bcmp(a,b,c) memcmp (a,b,c)
- + #endif
-
- #include "config.h"
- #include "obstack.h"
- + #ifdef __TURBOC__
- + #include <stdarg.h>
- + #else
- #include "gvarargs.h"
- + #endif
-
- #ifdef USG
- #ifndef R_OK
- ***************
- *** 244,250 ****
- {
- {".c",
- "cpp %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{i*} %{trigraphs} -undef \
- ! -D__GNUC__ %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %{!ansi:%p} %P\
- %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic} %{P}\
- %{Wcomment*} %{Wtrigraphs} %{Wall} %{w} %C\
- %i %{!M*:%{!E:%{!pipe:%g.cpp}}}%{E:%W{o*}}%{M*:%W{o*}} |\n\
- --- 260,266 ----
- {
- {".c",
- "cpp %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{i*} %{trigraphs} -undef \
- ! -D__GNUC__ -DGNUDOS %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %{!ansi:%p} %P\
- %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic} %{P}\
- %{Wcomment*} %{Wtrigraphs} %{Wall} %{w} %C\
- %i %{!M*:%{!E:%{!pipe:%g.cpp}}}%{E:%W{o*}}%{M*:%W{o*}} |\n\
- ***************
- *** 257,265 ****
- %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %{gg:-G %g.sym}\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
- %{!pipe:%g.s}\n }}}"},
- ! {".cc",
- "cpp -+ %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{i*} \
- ! -undef -D__GNUC__ -D__GNUG__ %p %P\
- %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic} %{P}\
- %{Wcomment*} %{Wtrigraphs} %{Wall} %{w} %C\
- %i %{!M*:%{!E:%{!pipe:%g.cpp}}}%{E:%W{o*}}%{M*:%W{o*}} |\n\
- --- 273,281 ----
- %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %{gg:-G %g.sym}\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o}\
- %{!pipe:%g.s}\n }}}"},
- ! {".cc", /* GNUDOS: add -D__cplusplus */
- "cpp -+ %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{i*} \
- ! -undef -D__GNUC__ -DGNUDOS -D__GNUG__ -D__cplusplus %p %P\
- %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic} %{P}\
- %{Wcomment*} %{Wtrigraphs} %{Wall} %{w} %C\
- %i %{!M*:%{!E:%{!pipe:%g.cpp}}}%{E:%W{o*}}%{M*:%W{o*}} |\n\
- ***************
- *** 284,290 ****
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %i\n }"},
- {".S",
- "cpp %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{trigraphs} \
- ! -undef -D__GNUC__ -$ %p %P\
- %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic} %{P}\
- %{Wcomment*} %{Wtrigraphs} %{Wall} %{w} %C\
- %i %{!M*:%{!E:%{!pipe:%g.s}}}%{E:%W{o*}}%{M*:%W{o*}} |\n\
- --- 300,306 ----
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%b.o} %i\n }"},
- {".S",
- "cpp %{nostdinc} %{C} %{v} %{D*} %{U*} %{I*} %{M*} %{trigraphs} \
- ! -undef -D__GNUC__ -DGNUDOS -$ %p %P\
- %c %{O:-D__OPTIMIZE__} %{traditional} %{pedantic} %{P}\
- %{Wcomment*} %{Wtrigraphs} %{Wall} %{w} %C\
- %i %{!M*:%{!E:%{!pipe:%g.s}}}%{E:%W{o*}}%{M*:%W{o*}} |\n\
- ***************
- *** 299,305 ****
- char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld %{o*} %l\
- %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
- %{y*} %{!A:%{!nostdlib:%S}} \
- ! %{L*} %o %{!nostdlib:gnulib%s %{g:-lg} %L gnulib%s %{!A:%E}}\n }}}}";
-
- /* Accumulate a command (program name and args), and run it. */
-
- --- 315,323 ----
- char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld %{o*} %l\
- %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
- %{y*} %{!A:%{!nostdlib:%S}} \
- ! %{L*} %o %{!nostdlib:%L %{!A:%E}}\n }}}}";
- ! /* GNUDOS: gnulib is in libc.a (above), no libg.a */
- ! /* %{L*} %o %{!nostdlib:gnulib%s %{g:-lg} %L gnulib%s %{!A:%E}}\n }}}}"; */
-
- /* Accumulate a command (program name and args), and run it. */
-
- ***************
- *** 532,540 ****
- --- 550,580 ----
- choose_temp_base ()
- {
- extern char *getenv ();
- + #ifndef __TURBOC__
- char *base = getenv ("TMPDIR");
- int len;
- + #else
- + char *base = 0;
- + int len;
- + char *bp;
-
- + /* GNUDOS: check GNUTMP and TMP/TEMP environment variables */
- + if (base == (char *)0) base = getenv("GCCTMP");
- + if (base == (char *)0) base = getenv("TMP");
- + if (base == (char *)0) base = getenv("TEMP");
- + if (base == (char *)0) base = getenv("TMPDIR");
- + if (base == (char *)0) base = "./";
- + for (bp=base; *bp; bp++)
- + if (*bp == '\\') *bp = '/';
- + if (bp[-1] != '/')
- + {
- + bp = (char *)malloc(strlen(base)+2);
- + strcpy(bp, base);
- + strcat(bp, "/");
- + base = bp;
- + }
- + #endif
- +
- if (base == (char *)0)
- {
- #ifdef P_tmpdir
- ***************
- *** 558,563 ****
- --- 598,606 ----
- strcpy (temp_filename + len, "ccXXXXXX");
-
- mktemp (temp_filename);
- + #ifdef __TURBOC__ /* GNUDOS: use ccXX_XXX.??? - turbo uses ccXX.XXX */
- + temp_filename[strlen(temp_filename)-4] = '_';
- + #endif
- temp_filename_length = strlen (temp_filename);
- }
-
- ***************
- *** 572,577 ****
- --- 615,627 ----
- char *temp;
- int size;
-
- + #ifdef __TURBOC__ /* GNUDOS: we need .exe on the end */
- + char *ptmp = malloc(strlen(prog)+5);
- + strcpy(ptmp, prog);
- + strcat(ptmp, ".exe");
- + prog = ptmp;
- + #endif
- +
- size = strlen (standard_exec_prefix);
- if (user_exec_prefix != 0 && strlen (user_exec_prefix) > size)
- size = strlen (user_exec_prefix);
- ***************
- *** 683,688 ****
- --- 733,741 ----
- NOT_LAST is nonzero if this is not the last subcommand
- (i.e. its output should be piped to the next one.) */
-
- + /* GNUDOS: set up response file, spawn process and wait for it to come
- + back. No pipe support. */
- +
- static int
- pexecute (func, program, argv, not_last)
- char *program;
- ***************
- *** 694,699 ****
- --- 747,790 ----
- int pdes[2];
- int input_desc = last_pipe_input;
- int output_desc = STDOUT_FILE_NO;
- + #ifdef __TURBOC__
- + int i;
- + char *newargv[3];
- + FILE *parm_f;
- + char PARM_FILE[80];
- + char APARM_FILE[80];
- +
- + char *s = alloca(strlen(program)+5);
- + strcpy(s, program);
- +
- + sprintf(PARM_FILE, "%s.gp", temp_filename);
- +
- + parm_f = fopen(PARM_FILE, "w");
- + if (parm_f == NULL)
- + {
- + pid = (*func)(P_WAIT, s, argv);
- + }
- + else
- + {
- + for (i=1; argv[i]; i++)
- + {
- + fputs(argv[i], parm_f);
- + fputc('\n', parm_f);
- + }
- + fclose(parm_f);
- + newargv[0] = argv[0];
- + sprintf(APARM_FILE, "@%s.gp", temp_filename);
- + newargv[1] = APARM_FILE;
- + newargv[2] = 0;
- + pid = (*func)(P_WAIT, s, newargv);
- + unlink(PARM_FILE);
- + }
- + if (pid == -1)
- + return errno;
- + return pid << 8;
- +
- + #else /* ifdef __TURBOC__ */
- +
-
- /* If this isn't the last process, make a pipe for its output,
- and record it as waiting to be the input to the next process. */
- ***************
- *** 752,757 ****
- --- 843,849 ----
- /* Return child's process number. */
- return pid;
- }
- + #endif /* ifdef __TURBOC__ */
- }
-
- /* Execute the command specified by the arguments on the current line of spec.
- ***************
- *** 845,851 ****
- --- 937,947 ----
- extern int execv(), execvp();
- char *string = commands[i].argv[0];
-
- + #ifdef __TURBOC__
- + commands[i].pid = pexecute ((string != commands[i].prog ? spawnv : spawnvp),
- + #else
- commands[i].pid = pexecute ((string != commands[i].prog ? execv : execvp),
- + #endif
- string, commands[i].argv,
- i + 1 < n_commands);
-
- ***************
- *** 868,876 ****
- --- 964,976 ----
- int pid;
- char *prog;
-
- + #ifdef __TURBOC__
- + pid = status = commands[0].pid;
- + #else
- pid = wait (&status);
- if (pid < 0)
- abort ();
- + #endif
-
- if (status != 0)
- {
- ***************
- *** 931,936 ****
- --- 1031,1056 ----
- n_switches = 0;
- n_infiles = 0;
-
- + #ifdef __TURBOC__
- + /* GNUDOS: use the GCC variable first */
- + env_exec_prefix = getenv("GCCBIN");
- + if (env_exec_prefix)
- + {
- + char *cp;
- + for (cp=env_exec_prefix; *cp; cp++)
- + if (*cp == '\\') *cp = '/';
- + if (cp[-1] != '/')
- + {
- + cp = (char *)malloc(strlen(env_exec_prefix)+2);
- + strcpy(cp, env_exec_prefix);
- + strcat(cp, "/");
- + env_exec_prefix = cp;
- + }
- + }
- +
- + if (env_exec_prefix == 0)
- + #endif
- +
- env_exec_prefix = getenv ("GCC_EXEC_PREFIX");
-
- /* Scan argv twice. Here, the first time, just count how many switches
- ***************
- *** 940,946 ****
- for (i = 1; i < argc; i++)
- {
- if (argv[i][0] == '-' && argv[i][1] != 'l')
- ! {
- register char *p = &argv[i][1];
- register int c = *p;
-
- --- 1060,1066 ----
- for (i = 1; i < argc; i++)
- {
- if (argv[i][0] == '-' && argv[i][1] != 'l')
- ! {
- register char *p = &argv[i][1];
- register int c = *p;
-
- ***************
- *** 1682,1688 ****
- --- 1802,1810 ----
- delete_temp_files ();
- /* Get the same signal again, this time not handled,
- so its normal effect occurs. */
- + #ifndef __TURBOC__
- kill (getpid (), signum);
- + #endif
- }
-
- int
- ***************
- *** 1696,1703 ****
- --- 1818,1852 ----
- int linker_was_run = 0;
- char *explicit_link_files;
-
- + #ifdef __TURBOC__
- + /* GNUDOS: use GCCLIB variable, handle response files */
- + char *env_lib_path;
- +
- + new_argc_argv(&argc, &argv);
- + #endif
- +
- programname = argv[0];
-
- + #ifdef __TURBOC__
- + /* GNUDOS: use GCCLIB variable to locate crt0.o */
- + env_lib_path = getenv("GCCLIB");
- + if (env_lib_path)
- + {
- + char *cp;
- + for (cp=env_lib_path; *cp; cp++)
- + if (*cp == '\\') *cp = '/';
- + if (cp[-1] != '/')
- + {
- + standard_startfile_prefix = (char *)malloc(strlen(env_lib_path)+2);
- + strcpy(standard_startfile_prefix, env_lib_path);
- + strcat(standard_startfile_prefix, "/");
- + }
- + standard_startfile_prefix_1 =
- + standard_startfile_prefix_2 = standard_startfile_prefix;
- + }
- + #endif
- +
- + #ifndef __TURBOC__
- if (signal (SIGINT, SIG_IGN) != SIG_IGN)
- signal (SIGINT, fatal_error);
- if (signal (SIGHUP, SIG_IGN) != SIG_IGN)
- ***************
- *** 1706,1711 ****
- --- 1855,1861 ----
- signal (SIGTERM, fatal_error);
- if (signal (SIGPIPE, SIG_IGN) != SIG_IGN)
- signal (SIGPIPE, fatal_error);
- + #endif
-
- argbuf_length = 10;
- argbuf = (char **) xmalloc (argbuf_length * sizeof (char *));
- diff +context=3 +entire-new-file ogcc-1.39/global-a.c gcc-1.39/global-a.c
- *** ogcc-1.39/global-a.c Sun Mar 24 14:56:54 1991
- --- gcc-1.39/global-a.c Thu Mar 7 00:12:04 1991
- ***************
- *** 322,327 ****
- --- 322,328 ----
- the value of floor_log2 times the maximum number of
- times a register can occur in one insn (surely less than 100).
- Multiplying this by 10000 can't overflow. */
- + #ifndef GNUDOS
- register int pri1
- = (((double) (floor_log2 (reg_n_refs[r1]) * reg_n_refs[r1])
- / (reg_live_length[r1] * allocno_size[*v1]))
- ***************
- *** 330,335 ****
- --- 331,345 ----
- = (((double) (floor_log2 (reg_n_refs[r2]) * reg_n_refs[r2])
- / (reg_live_length[r2] * allocno_size[*v2]))
- * 10000);
- + #else
- +
- + register int pri1
- + = (((floor_log2 (reg_n_refs[r1]) * reg_n_refs[r1] * 10000)
- + / (reg_live_length[r1] * allocno_size[*v1])));
- + register int pri2
- + = (((floor_log2 (reg_n_refs[r2]) * reg_n_refs[r2] * 10000)
- + / (reg_live_length[r2] * allocno_size[*v2])));
- + #endif
- if (pri2 - pri1)
- return pri2 - pri1;
-
- diff +context=3 +entire-new-file ogcc-1.39/makeall.bat gcc-1.39/makeall.bat
- *** ogcc-1.39/makeall.bat
- --- gcc-1.39/makeall.bat Thu Mar 7 00:12:04 1991
- ***************
- *** 0 ****
- --- 1,54 ----
- + @echo off
- + if exist make.com del make.com
- +
- + if not exist genconfig make genconfig
- + if exist insn-config.h goto L1
- + go32 genconfig md > insn-config.h
- + touch stamp-config
- + :L1
- +
- + if not exist genflags make genflags
- + if exist insn-flags.h goto L2
- + go32 genflags md > insn-flags.h
- + touch stamp-flags
- + :L2
- +
- + if not exist gencodes make gencodes
- + if exist insn-codes.h goto L3
- + go32 gencodes md > insn-codes.h
- + touch stamp-codes
- + :L3
- +
- + if not exist genemit make genemit
- + if exist insn-emit.c goto L4
- + go32 genemit md > insn-emit.c
- + touch stamp-emit
- + :L4
- +
- + if not exist genrecog make genrecog
- + if exist insn-recog.c goto L5
- + go32 genrecog md > insn-recog.c
- + touch stamp-recog
- + :L5
- +
- + if not exist genextract make genextract
- + if exist insn-extract.c goto L6
- + go32 genextract md > insn-extract.c
- + touch stamp-extract
- + :L6
- +
- + if not exist genpeep make genpeep
- + if exist insn-peep.c goto L7
- + go32 genpeep md > insn-peep.c
- + touch stamp-peep
- + :L7
- +
- + if not exist genoutput make genoutput
- + if exist insn-output.c goto L8
- + go32 genoutput md > insn-output.c
- + touch stamp-output
- + :L8
- +
- + make cccp
- + if not errorlevel 1 make cc1
- + if not errorlevel 1 make gcc.exe
- diff +context=3 +entire-new-file ogcc-1.39/makefile gcc-1.39/makefile
- *** ogcc-1.39/makefile Sun Mar 24 14:57:00 1991
- --- gcc-1.39/makefile Sun Mar 24 15:01:20 1991
- ***************
- *** 21,28 ****
- # Variables that exist for you to override.
- # See below for how to change them for certain systems.
-
- ! CFLAGS = -g $(XCFLAGS)
- ! CC = cc
- BISON = bison
- BISONFLAGS = -v
- # This should be the version of ar to use with output from GCC.
- --- 21,29 ----
- # Variables that exist for you to override.
- # See below for how to change them for certain systems.
-
- ! # GNUDOS: don't bother with -g
- ! CFLAGS = -O $(XCFLAGS) -DGNUDOS
- ! CC = gcc
- BISON = bison
- BISONFLAGS = -v
- # This should be the version of ar to use with output from GCC.
- ***************
- *** 67,73 ****
-
- # Change this to a null string if obstacks are installed in the
- # system library.
- ! OBSTACK=obstack.o
-
- # Directory to link to, when using the target `maketest'.
- DIR = ../gcc
- --- 68,74 ----
-
- # Change this to a null string if obstacks are installed in the
- # system library.
- ! # OBSTACK=obstack.o
-
- # Directory to link to, when using the target `maketest'.
- DIR = ../gcc
- ***************
- *** 178,184 ****
- $(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
-
- # Language-specific object files for C.
- ! C_OBJS = c-parse.tab.o c-decl.o c-typeck.o c-convert.o
-
- # Language-specific object files for C++.
- # (These are not yet released.)
- --- 179,186 ----
- $(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
-
- # Language-specific object files for C.
- ! # GNUDOS: use c-parse_tab.c
- ! C_OBJS = c-parse_tab.o c-decl.o c-typeck.o c-convert.o
-
- # Language-specific object files for C++.
- # (These are not yet released.)
- ***************
- *** 256,268 ****
-
- compilations: ${OBJS}
-
- gcc: gcc.o version.o $(LIBDEPS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o gccnew gcc.o version.o $(LIBS)
- # Go via `gccnew' to avoid `file busy' if $(CC) is `gcc'.
- mv gccnew gcc
-
- cc1: $(C_OBJS) $(OBJS) $(LIBDEPS)
- ! $(CC) $(CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(LIBS)
-
- cc1plus: $(CPLUS_OBJS) $(OBJS) $(LIBDEPS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(LIBS)
- --- 258,280 ----
-
- compilations: ${OBJS}
-
- + # GNUDOS: use Turbo-C to compile gcc itself
- + .c.obj:
- + tcc $(CFLAGS) $(INCLUDES) -c $<
- +
- + gcc.exe: gcc.obj version.obj obstack.obj alloca.obj newargcv.obj
- + tcc $(CFLAGS) $(LDFLAGS) gcc.obj version.obj obstack.obj alloca.obj newargcv.obj
- +
- +
- gcc: gcc.o version.o $(LIBDEPS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o gccnew gcc.o version.o $(LIBS)
- # Go via `gccnew' to avoid `file busy' if $(CC) is `gcc'.
- mv gccnew gcc
-
- + # GNUDOS: use response file
- cc1: $(C_OBJS) $(OBJS) $(LIBDEPS)
- ! >cc1.rf $(C_OBJS) $(OBJS) $(LIBS)
- ! $(CC) $(CFLAGS) $(LDFLAGS) -o cc1 @cc1.rf
-
- cc1plus: $(CPLUS_OBJS) $(OBJS) $(LIBDEPS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(OBJS) $(LIBS)
- ***************
- *** 333,342 ****
-
- # C language specific files.
-
- ! c-parse.tab.o : $(srcdir)/c-parse.tab.c $(CONFIG_H) $(TREE_H) c-parse.h c-tree.h input.h
- ! $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -c $(srcdir)/c-parse.tab.c
- ! $(srcdir)/c-parse.tab.c : $(srcdir)/c-parse.y
- ! $(BISON) $(BISONFLAGS) $(srcdir)/c-parse.y -o $@
-
- c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-parse.h flags.h
- c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
- --- 345,355 ----
-
- # C language specific files.
-
- ! # GNUDOS: use c-parse_tab.c, simplify
- ! c-parse_tab.o : c-parse_tab.c $(CONFIG_H) $(TREE_H) c-parse.h c-tree.h input.h
- ! $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -c c-parse_tab.c
- ! c-parse_tab.c : c-parse.y
- ! $(BISON) $(BISONFLAGS) c-parse.y -o $@
-
- c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-parse.h flags.h
- c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
- ***************
- *** 450,468 ****
-
- # Each of the other insn-* files is handled by a similar pair of rules.
-
- ! insn-config.h: stamp-config ;
- stamp-config : md genconfig $(srcdir)/move-if-change
- ./genconfig md > tmp-config.h
- $(srcdir)/move-if-change tmp-config.h insn-config.h
- touch stamp-config
-
- ! insn-flags.h: stamp-flags ;
- stamp-flags : md genflags $(srcdir)/move-if-change
- ./genflags md > tmp-flags.h
- $(srcdir)/move-if-change tmp-flags.h insn-flags.h
- touch stamp-flags
-
- ! insn-codes.h: stamp-codes ;
- stamp-codes : md gencodes $(srcdir)/move-if-change
- ./gencodes md > tmp-codes.h
- $(srcdir)/move-if-change tmp-codes.h insn-codes.h
- --- 463,482 ----
-
- # Each of the other insn-* files is handled by a similar pair of rules.
-
- ! # GNUDOS: remove the ';' on each dependency
- ! insn-config.h: stamp-config
- stamp-config : md genconfig $(srcdir)/move-if-change
- ./genconfig md > tmp-config.h
- $(srcdir)/move-if-change tmp-config.h insn-config.h
- touch stamp-config
-
- ! insn-flags.h: stamp-flags
- stamp-flags : md genflags $(srcdir)/move-if-change
- ./genflags md > tmp-flags.h
- $(srcdir)/move-if-change tmp-flags.h insn-flags.h
- touch stamp-flags
-
- ! insn-codes.h: stamp-codes
- stamp-codes : md gencodes $(srcdir)/move-if-change
- ./gencodes md > tmp-codes.h
- $(srcdir)/move-if-change tmp-codes.h insn-codes.h
- ***************
- *** 472,478 ****
- insn-config.h insn-flags.h
- $(CC) $(CFLAGS) $(INCLUDES) -c insn-emit.c
-
- ! insn-emit.c: stamp-emit ;
- stamp-emit : md genemit $(srcdir)/move-if-change
- ./genemit md > tmp-emit.c
- $(srcdir)/move-if-change tmp-emit.c insn-emit.c
- --- 486,492 ----
- insn-config.h insn-flags.h
- $(CC) $(CFLAGS) $(INCLUDES) -c insn-emit.c
-
- ! insn-emit.c: stamp-emit
- stamp-emit : md genemit $(srcdir)/move-if-change
- ./genemit md > tmp-emit.c
- $(srcdir)/move-if-change tmp-emit.c insn-emit.c
- ***************
- *** 481,487 ****
- insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h real.h recog.h
- $(CC) $(CFLAGS) $(INCLUDES) -c insn-recog.c
-
- ! insn-recog.c: stamp-recog ;
- stamp-recog : md genrecog $(srcdir)/move-if-change
- ./genrecog md > tmp-recog.c
- $(srcdir)/move-if-change tmp-recog.c insn-recog.c
- --- 495,501 ----
- insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h real.h recog.h
- $(CC) $(CFLAGS) $(INCLUDES) -c insn-recog.c
-
- ! insn-recog.c: stamp-recog
- stamp-recog : md genrecog $(srcdir)/move-if-change
- ./genrecog md > tmp-recog.c
- $(srcdir)/move-if-change tmp-recog.c insn-recog.c
- ***************
- *** 490,496 ****
- insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
- $(CC) $(CFLAGS) $(INCLUDES) -c insn-extract.c
-
- ! insn-extract.c: stamp-extract ;
- stamp-extract : md genextract $(srcdir)/move-if-change
- ./genextract md > tmp-extract.c
- $(srcdir)/move-if-change tmp-extract.c insn-extract.c
- --- 504,510 ----
- insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
- $(CC) $(CFLAGS) $(INCLUDES) -c insn-extract.c
-
- ! insn-extract.c: stamp-extract
- stamp-extract : md genextract $(srcdir)/move-if-change
- ./genextract md > tmp-extract.c
- $(srcdir)/move-if-change tmp-extract.c insn-extract.c
- ***************
- *** 499,505 ****
- insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h real.h
- $(CC) $(CFLAGS) $(INCLUDES) -c insn-peep.c
-
- ! insn-peep.c: stamp-peep ;
- stamp-peep : md genpeep $(srcdir)/move-if-change
- ./genpeep md > tmp-peep.c
- $(srcdir)/move-if-change tmp-peep.c insn-peep.c
- --- 513,519 ----
- insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h real.h
- $(CC) $(CFLAGS) $(INCLUDES) -c insn-peep.c
-
- ! insn-peep.c: stamp-peep
- stamp-peep : md genpeep $(srcdir)/move-if-change
- ./genpeep md > tmp-peep.c
- $(srcdir)/move-if-change tmp-peep.c insn-peep.c
- ***************
- *** 509,515 ****
- hard-reg-set.h insn-config.h insn-flags.h output.h aux-output.c
- $(CC) $(CFLAGS) $(INCLUDES) -c insn-output.c
-
- ! insn-output.c: stamp-output ;
- stamp-output : md genoutput $(srcdir)/move-if-change
- ./genoutput md > tmp-output.c
- $(srcdir)/move-if-change tmp-output.c insn-output.c
- --- 523,529 ----
- hard-reg-set.h insn-config.h insn-flags.h output.h aux-output.c
- $(CC) $(CFLAGS) $(INCLUDES) -c insn-output.c
-
- ! insn-output.c: stamp-output
- stamp-output : md genoutput $(srcdir)/move-if-change
- ./genoutput md > tmp-output.c
- $(srcdir)/move-if-change tmp-output.c insn-output.c
- ***************
- *** 571,581 ****
- $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
- $(srcdir)/cexp.c: $(srcdir)/cexp.y
- $(BISON) -o $(srcdir)/cexp.c $(srcdir)/cexp.y
- cccp.o: cccp.c $(CONFIG_H)
- ! $(CC) $(CFLAGS) $(INCLUDES) \
- ! -DGCC_INCLUDE_DIR=\"$(libdir)/gcc-include\" \
- ! -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
- ! -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
-
- $(srcdir)/cpp.info: $(srcdir)/cpp.texinfo
- makeinfo `echo $(srcdir)/cpp.texinfo | sed 's,^\./,,'`
- --- 585,601 ----
- $(CC) $(CFLAGS) $(CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
- $(srcdir)/cexp.c: $(srcdir)/cexp.y
- $(BISON) -o $(srcdir)/cexp.c $(srcdir)/cexp.y
- +
- + # GNUDOS: simplify, use response file
- cccp.o: cccp.c $(CONFIG_H)
- ! >cccp.rf -DGCC_INCLUDE_DIR="$(libdir)/gcc-include" -DGPLUSPLUS_INCLUDE_DIR="$(libdir)/g++-include"
- ! $(CC) $(CFLAGS) $(INCLUDES) -c cccp.c @cccp.rf
- !
- !
- ! # $(CC) $(CFLAGS) $(INCLUDES) \
- ! # -DGCC_INCLUDE_DIR=\"$(libdir)/gcc-include\" \
- ! # -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
- ! # -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
-
- $(srcdir)/cpp.info: $(srcdir)/cpp.texinfo
- makeinfo `echo $(srcdir)/cpp.texinfo | sed 's,^\./,,'`
- diff +context=3 +entire-new-file ogcc-1.39/newargcv.c gcc-1.39/newargcv.c
- *** ogcc-1.39/newargcv.c
- --- gcc-1.39/newargcv.c Thu Mar 7 00:12:04 1991
- ***************
- *** 0 ****
- --- 1,80 ----
- + /* History:23,5 */
- + #include <stdio.h>
- + #include <alloc.h>
- +
- + #ifdef TEST_NEWARG
- +
- + main(int argc, char **argv)
- + {
- + int i;
- + new_argc_argv(&argc, &argv);
- + printf("argc = %d\n", argc);
- + for (i=0; argv[i]; i++)
- + printf("argv[%d] = %s\n", i, argv[i]);
- + }
- +
- + #endif
- +
- + struct ARG {
- + struct ARG *next;
- + char *this;
- + } ARG;
- +
- + new_argc_argv(int *argc, char ***argv)
- + {
- + struct ARG *root = 0, *last;
- + struct ARG *arg;
- + char buf[1024];
- + int i;
- + FILE *f;
- + for (i=0; (*argv)[i]; i++)
- + {
- + if ((*argv)[i][0] == '@')
- + {
- + f = fopen((*argv)[i]+1, "r");
- + if (f == NULL)
- + goto regular_arg;
- + while (fscanf(f, "%s", buf) == 1)
- + {
- + arg = (struct ARG *)malloc(sizeof(struct ARG));
- + arg->next = 0;
- + arg->this = (char *)malloc(strlen(buf)+1);
- + strcpy(arg->this, buf);
- + if (!root)
- + root = last = arg;
- + else
- + {
- + last->next = arg;
- + last = arg;
- + }
- + }
- + fclose(f);
- + }
- + else
- + {
- + regular_arg:
- + arg = (struct ARG *)malloc(sizeof(struct ARG));
- + arg->next = 0;
- + arg->this = (*argv)[i];
- + if (!root)
- + root = last = arg;
- + else
- + {
- + last->next = arg;
- + last = arg;
- + }
- + }
- + }
- + for (*argc = 1, arg = root; arg; arg = arg->next)
- + (*argc)++;
- + *argv = (char **)malloc(*argc * sizeof(char *));
- + for ((*argc) = 0, arg = root; arg; arg = arg->next)
- + (*argv)[(*argc)++] = arg->this;
- + while (root)
- + {
- + arg = root->next;
- + free(root);
- + root = arg;
- + }
- + (*argv)[*argc] = 0;
- + }
-